package top.smallway.bs_vr.check;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class network {
    public static boolean checkEnable(Context activity) {
        NetworkInfo localNetworkInfo = ((ConnectivityManager) activity.getSystemService(Context.CONNECTIVITY_SERVICE)).getActiveNetworkInfo();
        if ((localNetworkInfo != null) && (localNetworkInfo.isAvailable())) return true;
        return false;
    }
}
